package com.ricervcvcer.order.client;

import com.ricervcvcer.common.util.ResultEntity;
import com.ricervcvcer.order.entity.TbSku;
import com.ricervcvcer.order.entity.TbSpecParam;
import com.ricervcvcer.order.entity.TbStock;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@FeignClient(value = "goods-server")
public interface GoodsClient {

    @GetMapping("goods/id/{id}")
    TbSku getSkuById(@PathVariable("id")Long id);

    @GetMapping("goods/getStockById/{id}")
    TbStock getStockById(@PathVariable("id")Long id);

    @ApiOperation("id查询规格信息")
    @RequestMapping("tb-spec-param/id/{id}")
    ResultEntity<TbSpecParam> getByid(@ApiParam("分类id") @PathVariable("id") Long id);
}